In a conventional Ethernet environment, in order to enable data communication (e.g., TCP/IP data communication) between a sender device and a target device, the DLL (data link layer) communication is established first, e.g., the sender device obtains a MAC (media address control) address of the target device according to an IP (Internet protocol) address of the target device by using the ARP (address resolution protocol). More specifically, according to the ARP, the sender device can broadcast an ARP request frame containing a target IP address on an Ethernet, and all the other network devices attached to the Ethernet can receive the request frame. But only the network device having the target IP address will respond to the ARP request with its own MAC address.
If the target device is attached to a different Ethernet from the sender device, and is assigned an IP address containing the same network ID with the sender device so as to be included in the same virtual private network with the sender device, an ARP Proxy may need to be established between the sender and target devices. For example, a proxy ARP can be configured in a gateway between the sender and target devices. More specifically, the gateway can receive an ARP request frame broadcasted by the sender device, and compare the target IP address contained in the ARP request frame with a set of IP addresses in the routing table of the gateway. If the IP address of the target device is included in the routing table, which means the target device can be reachable from the gateway, the gateway can respond to the sender device with its own MAC address to enable the DLL communication between the sender device and the gateway. As such, the gateway can receive IP packet from the sender device and then transfer the IP packet to the target device, such that the data communication between the sender and target devices can be established.
However, the conventional proxy ARP technique may cause some proxy ARP errors. For example, a sender host, a target host and a gateway having the proxy ARP function can be attached to the same Ethernet. The sender host can broadcast an ARP request frame containing the IP address of the target host. After receiving the ARP request frame, the target host can respond to the sender host with its own MAC address. However, IP address of the target host may be included in the routing table of the gateway, such that the gateway can also respond to the sender host with its own MAC address after receiving the ARP request frame. As a result, the latest MAC address received by the sender host may not be the MAC address of the target host, which may cause a proxy ARP error. In other words, the gateway may block the proper DDL communication. In addition, a change of the configuration of the routing table may also cause a proxy ARP error.